<template>
	<view>
		<view class="center">
			<image class="center-img" src="https://z3.ax1x.com/2021/04/21/cHxPSJ.png"></image>
			<view class="center-text">实名成功</view>
		</view>
		<view class="timer" @tap="a">
			<text>{{num}}  秒后自动关闭</text>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad() {
			const timer = setInterval(()=>{
				if(this.num>0){
					this.num--
				}
				if(this.num==0){
					clearInterval(timer)
					uni.navigateBack({
					    url:'/pages/personal/personal'
					});
				}
			},1000)
		},
		data() {
			return {
				num:5,
			}
		},
		methods: {
		
		}
	}
</script>

<style>
.timer{
	/* border: 1px solid red; */
	width: 100%;
	height: 50rpx;
	text-align: center;
	margin-top: 50rpx;
	color: rgba(0,0,0,0.4);
	font-size: 28rpx;
}
.center{
	width: 120rpx;
	height: 200rpx;
	margin-top: 250rpx;
	margin-left: 300rpx;
}
.center-img{
	width: 120rpx;
	height: 122rpx;
}
.center .center-text{
	font-size: 28rpx;
	font-weight: 600;
	margin-top: 24rpx;
	text-align: center;
}
</style>
